/*
 * Copyright 2009 Reuben Pasquini All rights reserved.
 * 
 * The contents of this file are subject to the terms of the
 * Lesser GNU General Public License (LGPL) Version 2.1.
 * You may not use this file except in compliance with the
 * License. You can obtain a copy of the License at
 * http://www.gnu.org/licenses/lgpl-2.1.html.
 */
package littleware.base.validate;

import java.util.Collection;
import java.util.Collections;

/**
 * Standard interface for validation test
 */
public interface Validator {
    /**
     * @throws ValidateException on validation failure
     */
    public void validate() throws ValidationException;
    /**
     * Returns collection of messages describing on or more invalid conditions,
     * or empty collection if validation passes ok
     * 
     * @return empty message collection on validation success, one or messages on validation failure
     */
    public Collection<String> checkIfValid();

}
